using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DTO;
using DAO;

namespace frmMain
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            CrystalDecisions.Shared.TableLogOnInfo logOnInfoTable = new CrystalDecisions.Shared.TableLogOnInfo();

            foreach (CrystalDecisions.CrystalReports.Engine.Table currentTable in CrystalReport21.Database.Tables)
            {
                logOnInfoTable.ConnectionInfo.ServerName = Application.StartupPath + "\\QLKS.mdb";
                currentTable.ApplyLogOnInfo(logOnInfoTable);
            }

            CrystalReport21.SetParameterValue("nguoilap", textBox1.Text);
            crystalReportViewer1.ReportSource = CrystalReport21;
        }
    }
}